package cn.edu.fzu.delivery.domain.enums;

/**
 * @author fangxin
 * @date 2022/11/18
 */
public enum NetworkCourierStatusEnum {

    ARRIVED(0, "已到达"),

    LEAVE(1, "已离开");

    private final int    value;

    private final String desc;

    private NetworkCourierStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static NetworkCourierStatusEnum parse(int value) {
        switch (value) {
            case 0:
                return ARRIVED;
            case 1:
                return LEAVE;
            default:
                return null;
        }
    }


    @Override
    public String toString() {
        return String.valueOf(getValue());
    }
}
